package com.baidu.mpks.schema.dao;

import com.baidu.mpks.schema.domain.UserSchemaClass;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface UserSchemaClassDao {

    List<UserSchemaClass> getAll();

    List<UserSchemaClass> getAllSys();

    List<String> getAllSysAtId();

    List<UserSchemaClass> getAllStruct();

    List<UserSchemaClass> getAllClass();

    List<UserSchemaClass> listByTypeAndPid(@Param("atType") String atType, @Param("pid") int pid);

    List<UserSchemaClass> getByType(@Param("type") Integer type);

    UserSchemaClass getOneByAtId(@Param("id") String atId);

    List<UserSchemaClass> listClassByAtIds(@Param("atIds") List<String> atIds, @Param("pid") int pid);

    UserSchemaClass getOneById(@Param("id") Integer id);

    List<UserSchemaClass> listClassByIds(@Param("ids") List<Integer> ids, @Param("pid") int pid);

    List<UserSchemaClass> getBySubClassOf(@Param("subClass") String subClass);

    List<String> getSysClassId();

    Set<String> getOpenSchemaClassId();

    void insert(UserSchemaClass schemaClass);

    void deleteByAtId(@Param("id") String atId);

    void deleteById(@Param("id") Integer atId);

    void update(UserSchemaClass schemaClass);

    void updateSubClassByAtId(String newId, String oldId);
}
